package com.lynn.salary.web.action;

import java.util.List;
import java.util.Map;

import com.lynn.salary.entity.SystemArgument;
import com.lynn.salary.pojo.TreeNode;
import com.lynn.salary.service.IEmployeeService;
import com.lynn.salary.util.ObjectFactory;

public class EmpAction extends BaseAction {

	IEmployeeService employeeService = (IEmployeeService) ObjectFactory
			.getBean("employeeService");

	private List<TreeNode> all;
	private String flag;
	private String empId;
	private String empName;

	private String itemId;

	private List<SystemArgument> quick;
	private List<Map<String, Object>> sp;

	private String msg;

	public String showTree() throws Exception {
		all = employeeService.findAll();
		if (flag != null && flag.equals("dep")) {
			for (int i = 0; i < all.size(); i++) {
				TreeNode t = (TreeNode) all.get(i);
				t.setChilds(null);
			}
		}
		return "showTree";
	}

	// 查询工资制度下所有的工资项
	public String findSalaryTypeDetail() throws Exception {

		return "findSalaryTypeDetail";
	}

	public IEmployeeService getEmployeeService() {
		return employeeService;
	}

	public void setEmployeeService(IEmployeeService employeeService) {
		this.employeeService = employeeService;
	}

	public List<TreeNode> getAll() {
		return all;
	}

	public void setAll(List<TreeNode> all) {
		this.all = all;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public List<SystemArgument> getQuick() {
		return quick;
	}

	public void setQuick(List<SystemArgument> quick) {
		this.quick = quick;
	}

	public String getEmpId() {
		return empId;
	}

	public void setEmpId(String empId) {
		this.empId = empId;
	}

	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}

	public String getEmpName() {
		return empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public String getMsg() {
		return msg;
	}

	public List<Map<String, Object>> getSp() {
		return sp;
	}

	public void setSp(List<Map<String, Object>> sp) {
		this.sp = sp;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
